import  {StartWebSocket}   from '@/api/WebSocket'
import { sendInitMsg,sendGetPath,openDev,unload,configureDevInfo,MicrophoneName,setImageWithBase64,configureRestionInfo,configureVideoFormate,VideoName }    from '@/api/mainH5'
function isIE() {
    if (!!window.ActiveXObject || "ActiveXObject" in window)
        return true;
    else
        return false;
}
export function getSingleCamera(){
  var  SingleCamera = {
    first:1,
    devIndex : 0,
    comparePath:"",
    compareBase64:"",
    previewDevIndex:0,
    realPicPath:"",
    encodeBase64Tag:0,

    //初始化UI
    InitSDKAndInitUI:function (obj){

      if (this.first == 1)
      {
        StartWebSocket();
        this.first = 0;
      }

    },
    //反初始化
    UInitCamera:function (obj) {
      unload();
    },
  }
    return  SingleCamera
}


//加载页面完成 mounted中调用，此处作废
/*window.onload = function () {
  //测试

    SingleCamera.InitSDKAndInitUI(g_obj);

}*/
//页面卸载//移入beforeDestroy方法中
/*window.onunload = function () {

  //测试end'
    SingleCamera.UInitCamera(g_obj);
}*/



